package com.frankie.weibo.util.htmltext;

import android.graphics.Color;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;

/**
 * Created by Frankie on 2016/8/18.
 */

public class MiClickSpan extends ClickableSpan {

    private String mUrl;
    public MiClickSpan(String url) {
        mUrl =url;
    }

    @Override
    public void updateDrawState(TextPaint ds) {
        super.updateDrawState(ds);
        ds.setColor(Color.BLUE);
        ds.setUnderlineText(false);
    }

    @Override
    public void onClick(View widget) {
        System.out.println("clicked:"+mUrl);
    }
}
